import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;

public class mian {
    public static void main(String[] args){
        MyThreadPool pool = new MyThreadPool(2,4,1, TimeUnit.SECONDS, new ArrayBlockingQueue<>(2), new DiscardRejectHandle());
        for(int i = 0; i < 6; i++){
            pool.execute(() -> {
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                System.out.println(Thread.currentThread().getName());
            });
        }

        System.out.println("mian未被阻塞");
    }

}
